<template>
  <div class="goodsList-container">
    <div class="goods-cars">
      <div class="cards-container" v-for="item in goodlist" :key="item.id">
        <div class="card">
          <van-image :src="item.list_pic_url" lazy-load></van-image>
        </div>
        <div class="text">
          <p class="name">{{ item.name }}</p>
          <p class="price">&yen; {{ item.retail_price }}</p>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { mapState } from "vuex";
export default {
  data() {
    return {
      flag: 0,
      flag1: "",
    };
  },
  computed: {
    ...mapState(['goodlist'])
  },

};
</script>

<style scoped lang='scss'>
.goodsList-container {
  .goods-cars {
    padding: 0 20px;
    background-color: #f8f8f8;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    .cards-container {
      width: 350px;
      height: 490px;
      .card {
        height: 350px;
        background-color: #fff;
        img {
          width: 100%;
        }
      }
      .text {
        height: 140px;
        background-color: #f8f8f8;
        padding-top: 17px;
        // box-sizing: border-box;
        .name {
          font-size: 26px;
          color: #333333;
          letter-spacing: 0;
          font-weight: 500;
        }
        .price {
          font-size: 26px;
          color: #9e4242;
          letter-spacing: 0;
          font-weight: 400;
          margin-top: 5px;
        }
      }
    }
  }
}
</style>